public class string{
    public static void main(String[] args) {
        String s = "hello world";
        System.out.println(s.substring(2));
        System.out.println(s.substring(2,4));

        StringBuffer buffer = new StringBuffer("This is a test string");
        System.out.println(buffer.replace(0,1,"This is a"));
    }
}